package com.akol.seret.webApiEntities.Requests;

import com.akol.seret.entities.Movie;
import com.akol.seret.webApiEntities.MessageType;
import com.akol.seret.webApiEntities.Responses.MovieResponseMessage;
import com.akol.seret.webApiEntities.Responses.ResponseMessage;

import java.util.ArrayList;

/**
 * Created by Gad on 18/02/2015.
 */

public class MovieRequestMessage extends BasicRequestMessage {

    public MovieRequestMessage(ArrayList<MessageType> byID,
                               ArrayList<Object> byObj) {
        super(com.akol.seret.webApiEntities.MessageType.Movie, byID, byObj);
    }

    public ResponseMessage HandleRequest() {
        // VLN: TODO: here need to be the search in DB for the requested movie
        // VLN: until that i will return always the same 2 movies.
        Movie movie1 = new Movie("Movie1");
        Movie movie2 = new Movie("Movie2");

        ArrayList<Object> requestedMovies = new ArrayList<Object>();
        requestedMovies.add(movie1);
        requestedMovies.add(movie2);

        MovieResponseMessage responseMessage = new MovieResponseMessage(requestedMovies);

        return responseMessage;
    }

}